package com.netx.data;
import java.sql.SQLException;


public class ConstraintException extends DatabaseException {

	private Field _violatedField;
	private Object _violatingValue;
	
	ConstraintException(Connection c, SQLException cause, String query) {
		super(c, cause, query);
		_violatedField = null;
		_violatingValue = null;
	}
	
	public void setViolationSource(Field vField, Object vValue) {
		_violatedField = vField;
		_violatingValue = vValue;
	}

	public Field getViolatedField() {
		return _violatedField;
	}
	
	public Object getViolatingValue() {
		return _violatingValue;
	}
}
